home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / cbm / 5671 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.2 KB

  1. Path: merle.acns.nwu.edu!judd
  2. From: judd@merle.acns.nwu.edu (Stephen Judd)
  3. Newsgroups: comp.sys.cbm
  4. Subject: Re: programming question:block-X commands
  5. Date: 16 Apr 1996 14:58:27 GMT
  6. Organization: Northwestern University, Evanston IL
  7. Message-ID: <4l0cij$vi@news.acns.nwu.edu>
  8. References: <2850597222@199.181.141.3> <829636603@p71.f411.n201.z2.ftn>
  9. Reply-To: sjudd@nwu.edu (Stephen Judd)
  10. NNTP-Posting-Host: merle.acns.nwu.edu
  11.  
  12. In article <829636603@p71.f411.n201.z2.ftn>,
  13. Pontus Berg  <Pontus.Berg@p71.anet.canit.se> wrote:
  14. >
  15. >It's probably a kewl one, but try this instead (if you want to run it with
  16. >decimal, it needs to be BCD)... (Hope I got it right from the top of my head)
  17. >
  18. >hexprt  pha
  19. >        asl
  20. >        asl
  21. >        asl
  22. >        asl
  23.  
  24. Better make those lsr
  25.  
  26. >        jsr hexout
  27. >        pla
  28. >hexout  and #$0f
  29.  
  30. And hexout can be moved here, to the tax -- gotta save those cycles! :).
  31.  
  32. >        tax
  33. >        lda hextab,x
  34. >        jmp $ffd2
  35.  
  36. And of course you might want an rts here :)
  37.  
  38. >
  39. >hextab  .text "0123456789abcdef"
  40.  
  41. If you want screen codes, you might use
  42.  
  43. HEXOUT
  44.     CLC
  45.     ADC #48
  46.     CMP #58
  47.     BCC :L1
  48.     SBC #57
  49. :L1    STA wherever, say (zp),y plus an INY
  50.     RTS
  51.  
  52.  
  53.     evetS-
  54.  
  55. >)  o/    Bacchus@FairLight.COM  Fido: 2:201/411.71         (
  56.